package com.gs.SynAntiWandering.receiver;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.gs.SynAntiWandering.service.CloseService;
import com.gs.SynAntiWandering.util.NetworkUtil;

public class NetworkBroadcastReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        if (NetworkUtil.getInstance().isConnected()) {
            Intent startService = new Intent(context, CloseService.class);
            context.startService(startService);
        }
    }
}
